package design.onekey.service;

import com.baomidou.mybatisplus.extension.service.IService;
import design.onekey.base.BaseEntity;
import design.onekey.base.PageEntity;
import design.onekey.model.dto.UserInfoDto;
import design.onekey.model.SysFunction;
import design.onekey.model.dto.SysMenuDto;
import design.onekey.model.dto.MenuTreeDto;

import java.util.List;

/**
* @Description: SysFunction服务接口
* @author
* @date 2020-06-05 04:03:04
* @version V1.0
*/
public interface ISysFunctionService extends IService<SysFunction>,GenericService<SysFunction>{

   /**
   * @Title: tablePagingQuery
   * @Description: 表格分页查询
   * @param @param model
   * @return BaseEntity
   * @throws
   */
   PageEntity tablePagingQuery(SysFunction model);

   /**
   *<p>Title: getDetail</p>
   *<p>Description: 获取详情</p>
   * @author blcloak
   * @param id
   * @return
   */
   BaseEntity getDetail(Long id);

   /**
   *<p>Title: insert</p>
   *<p>Description: 新增数据</p>
   * @author blcloak
   * @param model
   * @return
   */
   BaseEntity insert(SysFunction model, UserInfoDto userInfoDto);

   /**
   *<p>Title: update</p>
   *<p>Description: 更新数据</p>
   * @author blcloak
   * @param model
   */
   BaseEntity update(SysFunction model);

   /**
   *<p>Title: delete</p>
   *<p>Description: 单条删除数据</p>
   * @author blcloak
   * @param model
   * @return
   */
   BaseEntity delete(Long id);

   /**
   *<p>Title: deleteBatch</p>
   *<p>Description: 批量删除数据</p>
   * @author blcloak
   * @param list
   * @return
   */
   BaseEntity deleteBatch(List<Long> ids);

   /**
    * @Title: getFunctionsByRole
    * @Description: 根据角色获取功能
    * @param roleId
    * @return
    * @author blcloak
    * @date 2020-06-05 05:51:41
    */
   List<SysFunction> getFunctionsByRole(Long roleId);

   /**
    * @Title: getAllFunctions
    * @Description: 获取全部的功能
    * @return
    * @author blcloak
    * @date 2020-06-08 08:54:42
    */
   List<SysFunction> getAllFunctions();

   /**
    * @Title: getFunctionsByType
    * @Description: 根据类型获取功能
    * @param type
    * @return
    * @author blcloak
    * @date 2020-07-13 08:56:12
    */
   List<SysFunction> getFunctionsByType(int type);

   /**
    * @Title: getMenuFunctions
    * @Description: 获取菜单对应的功能权限
    * @param sysMenuDto
    * @return
    * @author blcloak
    * @date 2020-06-11 09:16:35
    */
   List<MenuTreeDto> getMenuFunctions(SysMenuDto sysMenuDto);

   /**
    * @Title: updatePermission
    * @Description: 动态更新权限，不需要重启服务
    * @return
    * @author blcloak
    * @date 2020-06-12 03:25:11
    */
   BaseEntity updatePermission();
}
